package com.ruoyi.ruoyixingyue.modules.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件表，可以是普通文件、图片等
 * </p>
 *
 * @author lzz
 * @since 2024-04-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("xy_file")
@ApiModel(value="File对象", description="文件表，可以是普通文件、图片等")
public class File implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键，文件id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "视频/图片地址")
    private String url;

    @ApiModelProperty(value = "文件上传时的名称")
    private String filename;

    @ApiModelProperty(value = "文件类型 1-图片 2-非图片")
    private Integer type;

    @ApiModelProperty(value = "状态：1-待上传 2-已上传")
    private Integer status;

    @ApiModelProperty(value = "平台：0-阿里，1-腾讯")
    private Integer platform;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除，默认0")
    private Integer deleted;


}
